package com.open.capacity.user.config;

import com.huawei.saas.interceptor.TenantDomainInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;

/**
 * @program: config-jdbc-demo
 * @author: GuoGaoJu
 * @create: 2023-03-25
 **/

@Configuration
public class AbsWebMvcConfigurationAdapter extends WebMvcConfigurationSupport {

    @Autowired
    private TenantDomainInterceptor tenantDomainInterceptor;

    //添加拦截器
    @Override
    public void addInterceptors(InterceptorRegistry interceptor) {
        interceptor.addInterceptor(tenantDomainInterceptor).addPathPatterns("/**");

    }

}

